﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterFinance.master" AutoEventWireup="true" CodeFile="InsertProduct.aspx.cs" Inherits="FinanceUsers_InsertProduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Header1" Runat="Server">
    
    <td>
    
    <div style="height: 30px">
        <%--<asp:ImageButton ID="ImageButton1" runat="server" Height="33px" 
            ImageUrl="~/Images/ButBack.png" onclick="ImageButton1_Click" Width="62px" />--%>
    </div>
    
</td>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Header" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
      <div style="background-color:#FFCC66;direction:rtl;padding-bottom:20px;padding-top:10px;border:1px solid #ccc;box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">
        <div style="padding-right:350px; width:100%">
        <asp:Image ID="Image2" runat="server" 
                        ImageUrl="~/Images/Device1.png" Width="17%"  />
        </div>
        <div style=" background-color:#FFCC99;width:90%;margin:auto;padding-right:8px;border:1px solid #FF9966; box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;border-radius: 4px;">

        <table class="style1" style="direction:rtl;width:100%" >
            <tr>
               
                <td align="center" colspan="5" bgcolor="#FF9900">
                    <asp:Label ID="Label5" runat="server" BackColor="#FF9900" Font-Bold="True" 
                        Font-Names="Tahoma" Font-Size="Small" ForeColor="#CC3300" Text="درج و ویرایش کالا"></asp:Label>
                </td>
               
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr align="right">
                <td>
                    &nbsp;</td>
                <td dir="rtl" width="8%">
                    <asp:Label ID="Label1" runat="server" Text="نام کالا"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" CssClass="textbox" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtName" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr align="right">
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Label ID="Label2" runat="server" Text="مدل کالا "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtModel" runat="server" CssClass="textbox"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtModel" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr align="right">
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td align="right">
        <asp:Button ID="Button1" runat="server" Height="21px" Text="ثبت" 
            Width="108px" onclick="Button1_Click" style="margin-left: 0px" CssClass="Button" />
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Green"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
            <td colspan="5">
               <div style="border: 1px solid #DEDEDE;border-radius:3px;box-shadow: 0px 0px 10px rgba(189, 189, 189, 0.4);padding :10px;width:70%;margin:auto;background-color:rgba(0, 0, 0, 0.067)">
                <div  class="headerTable" >
                <div style="width:10%;float:right">
                    <asp:Image ID="Image1" runat="server" src="../Images/Device2.png" Height="40px" />
                </div>
                <div style="width:50%;float:right">
                    <h3><asp:Label ID="Label10" runat="server" Text="اطلاعات کالاهای ثبت شده" 
                            ForeColor="#CC3300"></asp:Label></h3>
                </div>
                
                
                </div>
                <div   >
            <asp:GridView ID="GrwDevice" runat="server" AutoGenerateColumns="False" 
                    CellPadding="3" DataSourceID="SqlDataSourceDevice" 
                    AllowPaging="True" AllowSorting="True" BackColor="White"    
                    onrowcommand="GrwDevice_RowCommand" Width="100%" BorderStyle="None"  >
                    <Columns>
                        <asp:BoundField DataField="Name" HeaderText="نام کالا" SortExpression="Name" ReadOnly="true"/>
                        <asp:BoundField DataField="Model" HeaderText=" مدل"  SortExpression="Model" ReadOnly="true"/>
                        
                      <asp:TemplateField>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="../ImageIcon/Edit-icon.png"   AlternateText="ویرایش" CausesValidation="false" CommandName="Edit" CommandArgument='<%#Eval("Id")%>' />
                        </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#FF9900" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" BorderColor="White" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#007DBB" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#00547E" />
                </asp:GridView>
                </div>
                </div>
            </td>
            
            
            
            
            </tr>
        </table>
        </div>
        <asp:SqlDataSource ID="SqlDataSourceDevice" runat="server" ConnectionString="<%$ ConnectionStrings:CON %>"
        ProviderName="System.Data.SqlClient" 
       SelectCommand="SELECT [Id],[Name],[model] FROM [TblDevice]"
        ></asp:SqlDataSource>
        <br />
    </p>
    <p>
    </p>
</asp:Content>

